import {EmergencyMedicalRecord} from '@/demo-data/types/patient'
import {Patient} from "@/demo-data/types/patient";

export const emergencyRecords: EmergencyMedicalRecord[] = [
  {
    patient_id: "PT2025001",
    name: "黎天剑",
    medical_records: {
      diagnosis: "原发性高尿酸血症（痛风）",
      main_symptoms: "右足第一跖趾关节疼痛、肿胀，活动受限",
      treatment_plan: [
        "1. 急性期治疗：控制炎症和疼痛",
        "2. 长期治疗：降低血尿酸水平",
        "3. 生活方式干预：控制饮食、规律运动"
      ],
      prescriptions: [
        {
          drug_name: "别嘌醇片",
          specification: "100mg",
          usage: "每日1次，每次1片",
          duration: "30天",
          status: "进行中"
        },
        {
          drug_name: "秋水仙碱片",
          specification: "0.5mg",
          usage: "每日2次，每次1片",
          duration: "5天",
          status: "已完成"
        },
        {
          drug_name: "布洛芬缓释胶囊",
          specification: "300mg",
          usage: "每日2次，每次1粒",
          duration: "7天",
          status: "已完成"
        }
      ],
      recurrency: [1, 0, 2, 1, 0, 0],
      uric_acid_levels: {
        current: "486 μmol/L",
        trend: "轻上2% +12%",
        is_miss_drug: "否",
        is_change_drug: "是",
        is_recurrency: "是",
        time_frame: "近30天内"
      }
    },
    "blood_uric_acid_trend": {
      "data": [
        {"time": "2024-10", "value": 418},
        {"time": "2024-11", "value": 528},
        {"time": "2024-12", "value": 460},
        {"time": "2025-01", "value": 518},
        {"time": "2025-02", "value": 468},
        {"time": "2025-03", "value": 428}
      ]
    },
  },
  {
    patient_id: "PT2025002",
    name: "纪建源",
    medical_records: {
      diagnosis: "原发性高尿酸血症（痛风）",
      main_symptoms: "左足第一跖趾关节疼痛、肿胀，活动受限",
      treatment_plan: [
        "1. 急性期治疗：控制炎症和疼痛",
        "2. 长期治疗：降低血尿酸水平",
        "3. 生活方式干预：控制饮食、规律运动"
      ],
      prescriptions: [
        {
          drug_name: "别嘌醇片",
          specification: "100mg",
          usage: "每日1次，每次1片",
          duration: "30天",
          status: "进行中"
        },
        {
          drug_name: "秋水仙碱片",
          specification: "0.5mg",
          usage: "每日2次，每次1片",
          duration: "5天",
          status: "已完成"
        },
        {
          drug_name: "布洛芬缓释胶囊",
          specification: "300mg",
          usage: "每日2次，每次1粒",
          duration: "7天",
          status: "已完成"
        }
      ],
      recurrency: [1, 0, 2, 1, 0, 0],
      uric_acid_levels: {
        current: "486 μmol/L",
        trend: "轻上2% +12%",
        is_miss_drug: "否",
        is_change_drug: "是",
        is_recurrency: "是",
        time_frame: "近30天内"
      }
    },
    "blood_uric_acid_trend": {
      "data": [
        {"time": "2024-10", "value": 418},
        {"time": "2024-11", "value": 528},
        {"time": "2024-12", "value": 460},
        {"time": "2025-01", "value": 518},
        {"time": "2025-02", "value": 468},
        {"time": "2025-03", "value": 428}
      ]
    }
  },
  {
    patient_id: "PT2025003",
    name: "徐雄",
    medical_records: {
      diagnosis: "原发性高尿酸血症（痛风）",
      main_symptoms: "右足踝关节疼痛、肿胀，活动受限",
      treatment_plan: [
        "1. 急性期治疗：控制炎症和疼痛",
        "2. 长期治疗：降低血尿酸水平",
        "3. 生活方式干预：控制饮食、规律运动"
      ],
      prescriptions: [
        {
          drug_name: "别嘌醇片",
          specification: "100mg",
          usage: "每日1次，每次1片",
          duration: "30天",
          status: "进行中"
        },
        {
          drug_name: "秋水仙碱片",
          specification: "0.5mg",
          usage: "每日2次，每次1片",
          duration: "5天",
          status: "已完成"
        },
        {
          drug_name: "布洛芬缓释胶囊",
          specification: "300mg",
          usage: "每日2次，每次1粒",
          duration: "7天",
          status: "已完成"
        }
      ],
      recurrency: [1, 0, 2, 1, 0, 0],
      uric_acid_levels: {
        current: "486 μmol/L",
        trend: "轻上2% +12%",
        is_miss_drug: "否",
        is_change_drug: "是",
        is_recurrency: "是",
        time_frame: "近30天内"
      }
    },
    "blood_uric_acid_trend": {
      "data": [
        {"time": "2024-10", "value": 418},
        {"time": "2024-11", "value": 528},
        {"time": "2024-12", "value": 460},
        {"time": "2025-01", "value": 518},
        {"time": "2025-02", "value": 468},
        {"time": "2025-03", "value": 428}
      ]
    }
  },
  {
    patient_id: "PT2025004",
    name: "涛林",
    medical_records: {
      diagnosis: "原发性高尿酸血症（痛风）",
      main_symptoms: "左足踝关节疼痛、肿胀，活动受限",
      treatment_plan: [
        "1. 急性期治疗：控制炎症和疼痛",
        "2. 长期治疗：降低血尿酸水平",
        "3. 生活方式干预：控制饮食、规律运动"
      ],
      prescriptions: [
        {
          drug_name: "别嘌醇片",
          specification: "100mg",
          usage: "每日1次，每次1片",
          duration: "30天",
          status: "进行中"
        },
        {
          drug_name: "秋水仙碱片",
          specification: "0.5mg",
          usage: "每日2次，每次1片",
          duration: "5天",
          status: "已完成"
        },
        {
          drug_name: "布洛芬缓释胶囊",
          specification: "300mg",
          usage: "每日2次，每次1粒",
          duration: "7天",
          status: "已完成"
        }
      ],
      recurrency: [1, 0, 2, 1, 0, 0],
      uric_acid_levels: {
        current: "486 μmol/L",
        trend: "轻上2% +12%",
        is_miss_drug: "否",
        is_change_drug: "是",
        is_recurrency: "是",
        time_frame: "近30天内"
      }
    },
    "blood_uric_acid_trend": {
      "data": [
        {"time": "2024-10", "value": 418},
        {"time": "2024-11", "value": 528},
        {"time": "2024-12", "value": 460},
        {"time": "2025-01", "value": 518},
        {"time": "2025-02", "value": 468},
        {"time": "2025-03", "value": 428}
      ]
    },
  }
]


// 获取急诊记录的方法
export const getEmergencyRecords = (patientId: string) => {
  return emergencyRecords.filter(record => record.patient_id === patientId);
}

